Skip to content

Migrate preview overlays - #837

Merged
thestinger merged 13 commits into
GrapheneOS:compose-prototypefrom
m4pl:task/763-viewfinder-overlays
Nov 28, 2026
Merged

thestinger merged 13 commits into
GrapheneOS:compose-prototypefrom
m4pl:task/763-viewfinder-overlays

Conversation

@m4pl

@m4pl m4pl commented Nov 24, 2026 •

Copy link
Copy Markdown
Screenshot_20261124-230503

This PR migrates the preview grid, level indicator, self-timer countdown, focus indicator, and zoom and exposure controls to design system components, and #764 will migrate the remaining viewfinder controls and tidy up the layout.

Closes #763

@m4pl

m4pl commented Nov 24, 2026

Copy link
Copy Markdown
Author

This PR is for code review only. We don’t plan to test it separately, since #764 brings the preview overlays and the rest of the viewfinder controls together.

@m4pl
m4pl requested review from RankoR and sdsantos November 24, 2026 22:49
@m4pl
m4pl marked this pull request as ready for review November 24, 2026 22:49

@sdsantos sdsantos left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you mentioned not to QA, but I did find some things while running the app to understand the code changes better:

  1. Weird zoom states transition glitch (notice how the .5x moves to the middle of the options before disappearing)
    https://github.com/user-attachments/assets/a092b326-5379-47ac-b169-3e3dfc234641
  2. When I change the exposure, the flash options get disabled, but there's no (?) icon explaining why.
  3. Sometimes, when swiping up to see the quick settings, I see the focus ring too (might be unavoidable).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking if you've noticed the differences in the pitch lines between both.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the horizon shift went from 24.dp to 40.dp.


override fun attach(camera: Camera) {
detach()
val exposure = cameraXStateMapper.map(camera.cameraInfo.exposureState)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it fine to get this just once, instead of tracking it like with zoom?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. CameraX has no LiveData for exposure and every write goes through ExposureControl, which confirms it.

@thestinger
thestinger merged commit 0b96501 into GrapheneOS:compose-prototype Nov 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants